package service.impl;


import dao.PaymentDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import po.Payment;
import service.PaymentService;

import java.util.List;

@Service
@Transactional
public class PaymentServiceImpl implements PaymentService {
    // 注解注入 PaymentDao
    @Autowired
    private PaymentDao paymentDao;

    @Override
    public List<Payment> allPayment(Payment payment) {
        return this.paymentDao.allPayment(payment);
    }

    @Override
    public Boolean addPayment(Payment payment) {
        return this.paymentDao.addPayment(payment) >0;
    }
}